package com.chainyoung.component_tmperson.ui.activity.debit;

import android.content.Intent;

import com.chainyoung.common.base.BaseActivity;
import com.chainyoung.common.di.AppComponent;
import com.chainyoung.component_tmperson.R;
import com.chainyoung.component_tmperson.R2;
import com.chainyoung.component_tmperson.entity.WalletDebit;
import com.chainyoung.router.RouterConstants;
import com.chainyoung.router.RouterUtils;

import butterknife.OnClick;

public class WalletDebitApplySuccessActivity extends BaseActivity {


    private WalletDebit walletDebit;

    @Override
    protected void setupActivityComponent(AppComponent appComponent) {

    }

    @Override
    protected void initUI() {
        walletDebit= (WalletDebit) getIntent().getSerializableExtra("walletDebit");
    }

    @Override
    protected void initData() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.tmperson_apply_debit_success;
    }

    /**
     * 继续借款
     */
    @OnClick(R2.id.tv_go_on_debit)
    void goDebit(){
        RouterUtils.getInstance()
                .build(RouterConstants.PATH_DEBIT)
                .navigation(mContext);
        finish();
    }

    /**
     * 完成去个人借贷页面
     */
    @OnClick(R2.id.tv_finish)
    void onFinish(){
        Intent intent = new Intent(mContext, WalletDebitActivity.class);
        intent.putExtra("walletDebit", walletDebit);
        mContext.startActivity(intent);
        finish();
    }
}
